package com.android.corestat.receiver;

import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;

import com.android.corestat.service.WorkingService;
import com.android.corestat.utils.CSLog;

/**
 * 类说明：
 * 
 * @author Baker.li
 * @date 2015年2月2日
 * @version 1.0
 */

public class MonitorReceiver extends BroadcastReceiver {

	@Override
	public void onReceive(Context context, Intent intent) {
		if (!WorkingService.isServiceTaskFinished(context)) {
			if (!WorkingService.isServiceRunning(context)) {
				CSLog.d("cs-monitor", "MonitorReceiver startWorkingService");
				WorkingService.startWorkingService(context, 0);
			}
		}
	}

}
